package com.ymt.bpm.service.platform.fauth;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ymt.bpm.model.PGroup;

/**
 * Created by Johnny on 2017/5/4.
 */
public interface FaPgService {

    JSONObject query(String tenantId, String search, String sort, String order,
                     int offset, int limit, int timezoneOffset);

    JSONObject get(String tenantId, String groupId, String lang, int timezoneOffset);

    String checkAttr(String tenantId, String attrName, String value, String groupId);

    JSONObject save(String tenantId, String loginName, String displayName, PGroup group);

    JSONObject delete(String tenantId, String loginName, String displayName, String groupId);

    JSONObject delSubPos(String tenantId, String loginName, String displayName, String groupId, String posId);

    JSONObject delSubPosUser(String tenantId, String loginName, String displayName, String groupId, String posId, String userId);

    JSONObject clearSubPos(String tenantId, String loginName, String displayName, String groupId);

    JSONObject clearSubPosUser(String tenantId, String loginName, String displayName, String groupId, String posId);

    JSONObject addSubPos(String tenantId, String loginName, String displayName, String groupId, String posIds);

    JSONObject addSubPosUser(String tenantId, String loginName, String displayName, String groupId, String posId, String userIds);

    String queryDhx(String tenantId, String queryParams, int fInd, int lInd, int timezoneOffset, String lang, String ordercolumns);

    JSONObject querySubPos(String tenantId, String groupId, String sort, String order,
                     int offset, int limit, int timezoneOffset);

    JSONObject querySubPosUser(String tenantId, String groupId, String posId, String sort, String order,
                           int offset, int limit, int timezoneOffset);

    JSONArray allByTenantWithPos(String tenantId);

}
